/**
 * @Author：ming
 * @Date：2023/10/2 8:24 PM
 * @Filename：Hj1
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @author ming
 */
public class Hj1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        while ((str=br.readLine())!=null){
            String[] split = str.trim().split(" ");
            int len = split[split.length - 1].length();
            System.out.println(len);
        }
    }
}
